package com.slipper.system.schedule;

import javax.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.slipper.system.api.schedule.bo.ScheduleLogBO;
import com.slipper.system.api.schedule.service.IScheduleLogSv;
import com.slipper.common.util.ResultUtil;

/**
 * 任务调度日志
 * 
 * @date 2020-03-28 17:10:06
 */
@RestController
@RequestMapping("/scheduleLog")
public class ScheduleLogController {
    @Resource
    private IScheduleLogSv scheduleLogSv;
    
    @PostMapping("/queryBy")
    public String queryBy(@RequestBody ScheduleLogBO bo) {
        return ResultUtil.toJson(scheduleLogSv.queryBy(bo));
    }
    
    @PostMapping("/queryPage")
    public String queryPage(@RequestBody ScheduleLogBO bo) {
        return ResultUtil.toJson(scheduleLogSv.queryPage(bo));
    }

    @PostMapping("/save")
    public String save(@RequestBody ScheduleLogBO bo) {
        scheduleLogSv.save(bo);
        return ResultUtil.toSuccessJson("保存成功！");
    }

    @PostMapping("/delete")
    public String delete(@RequestBody ScheduleLogBO bo) {
        return ResultUtil.toJson(scheduleLogSv.delete(bo));
    }
}
